/*
 *  dna_airping.h -- provide dna-system AirPing client core framework.
 *  
 *  ORIGINAL AUTHOR: Xu Chun (chun.xu@broadlink.com.cn)
 *
 *  Copyright (c) 2016 Broadlink Corporation
 */

#ifndef __DNA_AIRPING_H
#define __DNA_AIRPING_H

#ifdef __cplusplus
    extern "C" {
#endif

/*
*  dna-system AirPing running param.
*/
typedef struct dna_airping_param {
    unsigned short fw_version;               /* Firmware version */
    unsigned short svn_version;              /* Firmware svn revision */
    unsigned short protocol_version;         /* Firmware protocol version */
    unsigned short platform;                 /* Hardware platform ID */
    unsigned int timeout;                    /* Ping timeout (ms) */
} dna_airping_param_t;

/* 
*  dna-system AirPing client engine startup.
*
*  @param: airping running param
*
*  Return ping result (0 - Success, -1 - Timeout)
*/
int dna_airping_start(dna_airping_param_t * param);

#ifdef __cplusplus
}
#endif

#endif

